package com.kadron.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.kadron.base.KTVBase;

@Entity
@Table(name = "k_newsletter")
public class NewsLetter extends KTVBase implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -4091718052894219421L;

	protected Date start;
	protected boolean processed;
	protected boolean active;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "start")
	public Date getStart() {
		return start;
	}

	public void setStart(Date start) {
		this.start = start;
	}

	@Column(name = "processed")
	public boolean isProcessed() {
		return processed;
	}

	public void setProcessed(boolean processed) {
		this.processed = processed;
	}

	@Column(name = "active")
	public boolean isActive() {
		return active;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		NewsLetter other = (NewsLetter) obj;
		if (id != other.id)
			return false;
		return true;
	}

}
